# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=tomlplusplus
pkgver=3.4.0
pkgrel=1
pkgdesc="Header-only TOML config file parser and serializer for C++17"
arch=(loong64 x86_64)
url="https://marzer.github.io/tomlplusplus/"
license=(MIT)
depends=(
  gcc-libs
  glibc
)
makedepends=(cmake meson)
provides=(libtomlplusplus.so)
source=($pkgname-$pkgver.tar.gz::https://github.com/marzer/$pkgname/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('c227fc8147c9459b29ad24002aaf6ab2c42fac22ea04c1c52b283a0172581ccd4527b33c1931e0ef0d1db6b6a53f9e9882c6d4231c7f3494cf070d0220741aa5')
b2sums=('9495ccd78707ced11744eab7c1c0bf0c0c28e283d186195bb48d1059bae7eb1a874bc964b0fc45210fd73ffd7485ecf3e1159da227d0e1c8ff249e79c08eecf0')

build() {
  arch-meson $pkgname-$pkgver build
  ninja -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
